<div class="modal-header">
    <h3 class="modal-title">创建Topic</h3>
</div>
<div class="modal-body">
    <form class="bs-example form-horizontal">

        <div class="form-group">
            <div class="col-md-12">
                <label class="col-lg-2 control-label"><b style="color: #2e6da4;">Topic命名规则:</b></label>
                <div class="col-lg-10" style="margin-top:5px;">
                    <b style="color: #ec2121;">GGJ_TOPIC_${业务线}_${环境}</b>
                </div>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-12">
                <label class="col-lg-2 control-label"><b style="color: #2e6da4;">测试环境例子:</b></label>
                <div class="col-lg-10" style="margin-top:5px;">
                    <b style="color: #20a03f;">GGJ_TOPIC_OC_TEST</b>
                </div>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-12">
                <label class="col-lg-2 control-label">  <b style="color: #2e6da4;">生产环境例子:</b></label>
                <div class="col-lg-10" style="margin-top:5px;">
                    <b style="color: #ec2121;">GGJ_TOPIC_OC_PROD</b>
                </div>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-6">
                <label class="col-lg-4 control-label"><span style="color: #ec2121;">*</span>Topic</label>
                <div class="col-lg-8">
                    <input type="text" class="form-control" placeholder="Topic名称" ng-model="topic.topic">
                </div>
            </div>

            <div class="col-md-6">
                <label class="col-lg-4 control-label"><span style="color: #ec2121;">*</span>消息类型</label>
                <div class="col-lg-8">
                    <select class="form-control" ng-model="topic.messageType"
                            ng-options="type.code as type.name for type in messageTypes" required>
                        <option value="">--请选择--</option>
                    </select>
                </div>
            </div>

        </div>

        <div class="form-group">
            <div class="col-md-12">
                <label class="col-lg-2 control-label"><span style="color: #ec2121;">*</span>备注</label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="简短备注信息" ng-model="topic.remark">
                </div>
            </div>
        </div>

        <div class="form-group">
            <div style="text-align:center;">
                <button type="button" class="btn btn-sm btn-info" ng-click="createTopic()"><span
                        class="glyphicon glyphicon-plus"></span>创建
                </button>
            </div>
        </div>
    </form>
    <div ng-if="alert.type != ''">
        <div uib-alert ng-class="'alert-' + alert.type" close="closeAlert()">{{alert.msg}}</div>
    </div>
</div>